﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using XCommunity.Web;
using XCommunity.Users;

public partial class Members_Home : System.Web.UI.Page
{
  protected void Page_Load( object sender, EventArgs e )
  {
    AccountManage.RedirectLogin();

    var account = AccountContext.CurrentAccount;

    Title = string.Format( "XCommunity - {0}", account.Name );

    AttachedTopicsLinkItem.Text = AttachedTopicsLinkItem.Text.Replace( "%", UserProfiler.GetAttachedTopics().Length.ToString() );
    LaunchedTopicsLinkItem.Text = LaunchedTopicsLinkItem.Text.Replace( "%", UserProfiler.GetLaunchedTopics().Length.ToString() );


    switch ( Request.QueryString["view"] )
    {
      case "LaunchedTopics":
        LaunchedTopicsLinkItem.NavigateUrl = null;
        LaunchedTopicsLinkItem.Font.Bold = true;


        break;

      case "AttachedTopics":
        AttachedTopicsLinkItem.NavigateUrl = null;
        AttachedTopicsLinkItem.Font.Bold = true;


        break;

      default:
        Response.Redirect( "Home.aspx?view=AttachedTopics", true );
        break;

    }

    DataBind();






  }
}
